<template>
  <div id="app">
  <viewer :images="images" class="images clearfix">
    <template slot-scope="scope">
        <img v-for="src in scope.images"
             :src="src" :key="src" class="image">
      </template>
  </viewer>
</div>
</template>
<script>
import { getImg} from "@/api/chen/img";
import { getToken } from "@/utils/auth";
  export default {
    data() {
    
      return {
        images: [
        'https://picsum.photos/200/200',
      	'https://picsum.photos/300/200',
        'http://localhost:8080/img/1.jpg'
        ]
      };
    },
    methods: {
      show() {
        this.$viewerApi({
          images: this.images,
        })
      }
   
    },
    mounted(){
        getImg().then(res=>{
          this.images=res.imgPath
           
          
        })
      
    }
  }
</script>
<style >
.image {
    height: 200px;
    cursor: pointer;
    margin: 5px;
    display: inline-block;
  }
</style>